

def test_file1():
    with open("../Dog1.py", 'r+') as file_object:
        # contents = file_object.read()
        # print contents

        for line in file_object:
            print(line.strip())

        file_object.write(" I love you,heihei\n")

test_file1()


print('-----------------')
def test_file2():
    with open("../Dog1.py", 'r+') as file_object:
        # contents = file_object.read()
        # print contents

        for line in file_object:
            print(line.strip())

        file_object.write(" I love you,heihei\n")

test_file2()
